Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

532
Vistas
Consent is required to transfer ownership of a file to another user [Google Drive API]

I have a Google Sheets file shared with 1 user - owner (Gmail account) and 2nd user - writer (google service account like @iam.gserviceaccount.com).

I use this function to copy a table from user 1 by user 2 and make the owner of copied file user 1 again:

$ownerPermission = new Google_Service_Drive_Permission([
'type'         => 'user', 
'role'         => 'owner',
'emailAddress' => 'user1@gmail.com'
]);
$requestOwnership = $service->permissions->create($newfileId, $ownerPermission, ['fields' => 'id', 'transferOwnership' => 'true']); 

And all works well until yesterday! Now Gooogle Drive API returns error: Consent is required to transfer ownership of a file to another user

How to fix it?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

This seems to be working as expected as according to this Issue Tracker issue here:

Following up here, this is the expected behavior as currently Drive does not support the changing of the ownership for items which are owned by gmail.com accounts.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda